package com.csun.cmny.provider.model.dto.watch;

import io.swagger.annotations.ApiModel;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.io.Serializable;

/**
 * @Auther: chisj chisj@foxmal.com
 * @Date: 2019-01-17 17:47
 * @Description: the watch perio dto
 */
@Data
@ApiModel(value = "设置孝心手环静默时间段Dto")
public class WatchPeriodDto implements Serializable {

    private static final long serialVersionUID = -6486275987366757238L;

    @NotNull(message = "{device.id.null}")
    private Long deviceId;

    /**
     * 静默开始时间 0000 - 2359
     */
    @NotNull(message = "{watch.config.period.start.empty}")
    @Pattern(regexp = "^([0-1]+[0-9]|2[0-3])([0-5][0-9])$",
            message = "{watch.config.period.pattern}")
    private String periodStart;

    /**
     * 静默结束时间 0000 - 2359
     */
    @NotNull(message = "{watch.config.period.end.empty}")
    @Pattern(regexp = "^([0-1]+[0-9]|2[0-3])([0-5][0-9])$",
        message = "{watch.config.period.pattern}")
    private String periodEnd;

}
